package integration.properties.compression.impl;

import integration.dom.Message;
import integration.properties.compression.CompressionType;

public abstract class AbstractCompressionType implements CompressionType {

    @Override
    public Message uncompress(Message message) {
        System.out.println("Uncompressing " + message + " using " + toString());
        message.setCompressed(false);
        message.setCompressionType(null);
        return message;
    }

    @Override
    public Message compress(Message message) {
        System.out.println("Compressing " + message + " using " + toString());
        message.setCompressed(true);
        message.setCompressionType(toString());
        return message;
    }

    public boolean isSameCompressionTypeOf(Message message) {
        System.out.println("Performing magic to determine if this message is compressed using " + toString());
        return false;
    }
}
